<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>优购商城</title>
<!--载入css样式-->
<link rel="stylesheet" type="text/css" href="Public/Home/css/base.css"/>
<link rel="stylesheet" type="text/css" href="Public/Home/css/cart.css"/>
</head>
<body>
<!--头部公用模板-->
{{include file='VIEW_PATH/Common/header.php'}}
<!--购物车-->
<div id="cart">
	<div class="cart_header">
		<div class="logo fl">
			<a href="#"><img src="images/icon/logo-yg.png" alt="" /></a>
		</div>
		<div class="cart_step fr">
			<ul>
				<li>
					我的购物车
					<em></em>
					<i></i>
				</li>
				<li class="current">
					提交订单中心
					<em></em>
					<i></i>
				</li>
				<li>
					成功提交订单
					<em></em>
					<i></i>
				</li>
			</ul>
		</div>
	</div>

</div>

<!--订单表-->
<form id="order_form" action="{{U('Order/index')}}" method="post">
	{{if value="!$addrData"}}
	<!--收货地址-->
	<div class="address">
		<div class="address_title">
			<span class="col_title">请填写您的收货地址</span>
			<span class="back_cart">
				<a href="#">返回购物车</a>
			</span>
			<span class="fr manage_address">
				<a href="#">管理收货地址</a>
			</span>
		</div>
	</div>
	<!--地址表单-->
	<div class="address_info">
		
		<table class="address_table">
			<tr>
				<td class="table_left">
					收货人姓名
					<i>*</i>
				</td>
				<td class="table_right">
					<input type="text" name="rec_name" class="minput"  />
					<span class="">（请使用真实姓名，不能全部是数字/英文/包含特殊符号（括号、井号等））</span>
				</td>
			</tr>
			<tr>
				<td class="table_left">
					收货人地址
					<i>*</i>
				</td>
				<td class="table_right">
					<div class="fl dropdown_span">
						<a href="JavaScript:;">请选择省
							<i class="iconfont">&#xe61a;</i>
						</a>
					</div>
					<div class="fl dropdown_span">
						<a href="JavaScript:;">
							请选择城市
							<i class="iconfont">&#xe61a;</i>
						</a>
					</div>
					<div class="fl dropdown_span">
						<a href="JavaScript:;">
							请选择县区
							<i class="iconfont">&#xe61a;</i>
						</a>
					</div>
					<div class="fl rec_code">
						<span class="">邮政编码：</span>
						<input name="rec_Code" maxlength="6" onkeyup="this.value=this.value.replace(/\D/g,'')" onafterpaste="this.value=this.value.replace(/\D/g,'')" type="text">
						<span class="">（有助于快速确定送货地址） </span>
					</div>
				</td>
			</tr>
			
			<tr>
				<td class="table_left">
				</td>
				<td class="table_right">
					<input name="detail_address" maxlength="60" class="linput" style="width:250px" type="text">
					<span class="">（请填写详细地址，确保准确送达）</span>
				</td>
			</tr>
			<tr>
				<td class="table_left">
					收货人手机
					<i>*</i>
				</td>
				<td class="table_right">
					<input id="rec_tel" name="rec_tel" class="minput" value="" type="text">
				</td>
			</tr>
			<tr>
				<td class="table_left">
					收货时间：
					<i>*</i>
				</td>
				<td class="table_right">
					<select name="rec_time" class="rec_time">
	                        <option value="1">只工作日送货(双休日、假日不用送)</option>
	                        <option value="2">工作日、双休日与假日均可送货</option>
	                        <option value="3">只双休日、假日送货(工作日不用送)</option>
	                        <!--<option value="4">学校地址/地址白天没人</option>-->
	                </select>
	                <span class="">（送货时间仅供参考，快递公司会尽量满足您的要求）</span>
				</td>
			</tr>
		</table>
	</div>
	{{else}}
	<!--收货地址-->
	<div class="address">
		<div class="address_title">
			<span class="col_title">请选择您的收货地址</span>
			<span class="back_cart">
				<a href="#">返回购物车</a>
			</span>
			<span class="fr manage_address">
				<a href="#">管理收货地址</a>
			</span>
		</div>
	</div>
	{{foreach from="$addrData" value="$v"}}
	<div class="addr_infor">
		<dl {{if value="$v['index'] eq 1"}}class="curr"{{endif}}>
			<i></i>
			<p><span>{{$v['province']}}</span><strong>{{$v['city']}}</strong><span>{{$v['city']}}  </span>({{$v['consignee']}} 收)</p>
			<p>{{$v['detail']}}</p>
			<p>电话：<span>{{$v['tel']}}</span></p>
		</dl>
		<input type="hidden" class="addr_id" value="{{$v['adid']}}" />
	</div>
	{{endforeach}}
	{{endif}}
	<!--付款方式-->
	<div class="payment_method">
		<div class="payment_title">
			<span class="col_title">请选择您的付款方式</span>
			<span class="fr">
				<a href="#">查看银行限额及付款帮助 </a>
			</span>
		</div>
		<!--在线支付-->
		<div class="payment_online">
			<strong>在线支付 </strong>
			<span style="color: #E60012;">(在线支付免运费)</span>
		</div>
		<!--支付列表-->
		<div class="payment_list">
			<div class="payment_list_online">
				<!--网银支付-->
				<!--<dl>
					<dt>
						网银支付
						<span class="shuoming">支持国内几乎所有银行的储蓄卡及信用卡进行支付（需开通网上银行）</span>
					</dt>
					<dd>
						<span class="">
							<input name="webbankpay" id="bank_zhaoshang" value="zhaoshang" type="radio">
						</span>
						<img src="{{__PUBLIC__}}/Home/images/icon/bank-img13.png.jpeg" height="40" width="139"/>
					</dd>
					
				</dl>-->
				<!--支付平台-->
				<dl>
					<dt>
						支付平台
					</dt>
					<dd>
						<span class="">
							<input name="webbankpay" id="bank_zhaoshang" value="zhaoshang" type="radio">
						</span>
						<img src="{{__PUBLIC__}}/Home/images/icon/bank-img13.png.jpeg" height="40" width="139"/>
					</dd>
					
				</dl>
				
				<!--信用卡支付-->
				<!--<dl class="xyk">
					<dt>
						支付平台
						<img src="images/pic/kjpay.png"/>
						<span class="">由支付宝提供快捷支付保障，72小时安全赔付，<em>免开通网上银行</em>，有卡就能付</span>
						<a href="#">预览填写信息<i class="iconfont">&#xe616;</i></a>
						<a class="yanshi" href="#">查看快捷支付演示</a>
					</dt>
					<dd>
						<span class="">
							<input name="webbankpay" id="bank_zhaoshang" value="zhaoshang" type="radio">
						</span>
						<img src="{{__PUBLIC__}}/Home/images/icon/bank-img13.png.jpeg" height="40" width="139"/>
					</dd>
				</dl>-->
				
			</div>
			<!--货到付款-->
			<div class="">
				<!--预留功能-->
			</div>
		</div>
	</div>
	<!--确认订单信息-->
	<div class="confirm_info">
		<div class="confirm_info_title">
			<span class="col_title">确认订单信息</span>
		</div>
		<div class="cart_list">
			<table>
				<!--头部标题栏-->
				<tr>
					<th width="80" class="selecte_all">
						商品序号
					</th>
					<th width="100" >商品图片</th>
					<th width="400">商品名称</th>
					<th width="120">颜色尺码</th>
					<th width="120">单价</th>
					<th width="120">数量</th>
					<th width="120">小计(元)</th>
				</tr>
				<!--商品列表-->
				{{foreach from="$data" key="$k" value="$v"}}
				<?php
					static $sort = 1;
				?>
				<tr>
					<td width="80" class="sort">
						<?php
							echo $sort;
							$sort++;
						?>
					</td>
					<td width="100" class="goods_pic">
						<a target="_blank" href="{{U('Show/index',array('gid'=>$v['gid']))}}">
							<img width="60" src="{{$v['listpic']}}"/>
						</a>
					</td>
					<td width="328" class="goods_name">
						<a target="_blank" href="{{U('Show/index',array('gid'=>$v['gid']))}}">{{$v['gname']}}</a>
					</td>
					<td width="100" class="color_size">
						<div class="">
							<p>
								颜色：<span>{{$v['color']}}</span>
							</p>
							<p>
								尺码：<strong>{{$v['size']}}</strong>
							</p>
						</div>
					</td>
					<td width="120" class="goods_price">
						{{$v['sprice']}}
						<br />
						<span class="tip">
							限时抢
							<i></i>
						</span>
					</td>
					<td class="number" width="110">
						{{$v['num']}}
					</td>
					<td width="120" class="total">{{$v['total']}}</td>
					
				</tr>
				{{endforeach}}
				<!----------------------------------------------------我是分割线----------------------------->
				
			</table>
		</div>
		<div class="submit_order">
			<div class="fl">
				<!--左边预留空白内容区域-->
			</div>
			<div class="submit_order_right fr">
				<table>
					<tr class="spje">
						<th>
							<strong>商品金额：</strong>
						</th>
						<td>
							<strong>{{$total_all}}</strong>
						</td>
					</tr>
					<tr class="yf">
						<th>
							运费：
						</th>
						<td>
							<strong>15</strong>
						</td>
					</tr>
					<tr class="myf">
						<th>
							在线支付免运费：
						</th>
						<td>
							<strong>-15</strong>
						</td>
					</tr>
					<tr class="yfje">
						<th>
							应付金额：
						</th>
						<td>
							<strong><span>￥</span>{{$total_all}}</strong>
						</td>
					</tr>
				</table>
			</div>
		</div>
		
		
		<!--隐藏域提供支付订单需要的信息-->
		<!--1.地址信息-->
		{{if value="$addrData"}}
		{{foreach from="$addrData" value="$v"}}
		{{if value="$v['index'] eq 1"}}
		<input type="hidden" name="address_id" id="address_id" value="{{$v['adid']}}" />
		{{endif}}
		{{endforeach}}
		{{endif}}
		<!--2.商品信息-->
		{{foreach from="$data" value="$v"}}
		<input type="hidden" name="gid[]" value="{{$v['gid']}}" />
		<input type="hidden" name="num[]" value="{{$v['num']}}" />
		<input type="hidden" name="value[]" value="{{$v['value']}}" />
		{{if value="!isset($v['value'])"}}
		<input type="hidden" name="session_id[]" value="{{$v['session_id']}}" />
		{{else}}
		<input type="hidden" name="session_id[]" value="0" />
		{{endif}}
		{{endforeach}}
		<!--隐藏域结束-->
	
	
		
		
		<div class="submit">
			<div class="fr">
				<a href="#">返回购物车</a>
				<button type="submit">确认，提交订单</button>
			</div>
		</div>
	</div>
</form>


<!--购物保障-->	
<div id="security">
	<div class="fr">
		<p class="cart_bz">
			购物保障：
			<i class="iconfont">&#xe636;</i>
			100%正品
			<i class="iconfont">&#xe634;</i>
			10天退换货
			<i class="iconfont">&#xe635;</i>
			10天补差价
		</p>
		<p>
			<a href="">帮助我们改进购物流程</a>
		</p>
	</div>
</div>
<!--底部公用模板-->
{{include file='VIEW_PATH/Common/footer.php'}}
</body>
</html>
















